﻿
 
 
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>layui开发使用文档 - 入门指南</title>
<meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="apple-mobile-web-app-status-bar-style" content="black"> 
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no">
  
  <link rel="stylesheet" href="../layui/css/layui.css"  media="all">
  <link rel="stylesheet" href="../css/global.css" media="all">
</head>
<body>
<div class="layui-header header header-doc">
  <div class="layui-main">
    <a class="logo" href="../layui.html">
      <img src="../imgs/logo.png" alt="layui">
    </a>
    <div class="layui-form component">
      <select lay-search lay-filter="component">
        <option value="">搜索组件或模块</option>
        <option value="layout.html">grid 栅格布局</option>
        <option value="layout.html#admin">admin 后台布局</option>
        <option value="color.html">color 颜色</option>
        <option value="icon.html">iconfont 字体图标</option>
        <option value="anim.html">animation 动画</option>
        <option value="button.html">button 按钮</option>
        <option value="form.html">form 表单组</option>
        <option value="form.html#input">input 输入框</option>
        <option value="form.html#select">select 下拉选择框</option>
        <option value="form.html#checkbox">checkbox 复选框</option>
        <option value="form.html#switch">switch 开关</option>
        <option value="form.html#radio">radio 单选框</option>
        <option value="form.html#textarea">textarea 文本域</option>
        <option value="nav.html">nav 导航菜单</option>
        <option value="nav.html#breadcrumb">breadcrumb 面包屑</option>
        <option value="tab.html">tabs 选项卡</option>
        <option value="progress.html">progress 进度条</option>
        <option value="collapse.html">collapse 折叠面板/手风琴</option>
        <option value="table.html">table 表格元素</option>
        <option value="badge.html">badge 徽章</option>
        <option value="timeline.html">timeline 时间线</option>
        <option value="auxiliar.html#blockquote">blockquote 引用块</option>
        <option value="auxiliar.html#fieldset">fieldset 字段集</option>
        <option value="auxiliar.html#hr">hr 分割线</option>
        
        <option value="layer.html">layer 弹出层/弹窗综合</option>
        <option value="laydate.html">laydate 日期时间选择器</option>
        <option value="layim.html">layim 即时通讯/聊天</option>
        <option value="laypage.html">laypage 分页</option>
        <option value="laytpl.html">laytpl 模板引擎</option>
        <option value="form.html">form 表单模块</option>
        <option value="table.html">table 数据表格</option>
        <option value="upload.html">upload 文件/图片上传</option>
        <option value="element.html">element 常用元素操作</option>
        <option value="carousel.html">carousel 轮播/跑马灯</option>
        <option value="layedit.html">layedit 富文本编辑器</option>
        <option value="tree.html">tree 树形菜单</option>
        <option value="flow.html">flow 信息流/图片懒加载</option>
        <option value="util.html">util 工具集</option>
        <option value="code.html">code 代码修饰</option>
      </select>
    </div>
    <ul class="layui-nav">
      <li class="layui-nav-item layui-this">
        <a href="doc.html">文档<!--  --></a> 
      </li>
      <li class="layui-nav-item ">
        <a href="../demo/demo.html">示例<!-- <span class="layui-badge-dot"></span> --></a>
      </li> 
      
      <li class="layui-nav-item layui-hide-xs">
        <a href="http://fly.layui.com/" target="_blank">社区</a>
      </li>
      
      
      <li class="layui-nav-item">
        <!--<span class="layui-badge-dot" style="margin: -4px 3px 0;"></span>-->
        <a href="javascript:;">周边</a>
        <dl class="layui-nav-child">
          <dd class="layui-hide-sm layui-show-xs"><a href="http://fly.layui.com/" target="_blank">社区交流</a><hr></dd>
          <dd><a href="http://layim.layui.com/" target="_blank">即时聊天</a></dd>
          <dd><a href="http://www.layui.com/template/fly/" target="_blank">社区模板<span class="layui-badge-dot"></span></a></dd>
          <hr>
          <dd><a href="http://www.layui.com/alone.html" target="_blank">独立组件</a></dd>
          <dd><a href="http://fly.layui.com/jie/9842/" target="_blank">Axure组件</a></dd>
        </dl>
      </li>
      
      
      <li class="layui-nav-item layui-hide-xs">
        <a href="http://www.layui.com/admin/" target="_blank">后台方案<span class="layui-badge-dot"></span></a>
      </li>
      
    </ul>
  </div>
</div>
<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
<!--[if lt IE 9]>
  <script src="../js/html5.min.js"></script>
  <script src="../js/respond.min.js"></script>
<![endif]--> 
<ul class="site-dir">
  <li><a href="#use"><cite>用法</cite></a></li>
  <li><a href="#theme"><cite>按钮主题</cite></a></li>
  <li><a href="#size"><cite>按钮尺寸</cite> <span class="layui-badge-dot"></span></a></li>
  <li><a href="#radius"><cite>圆角按钮</cite></a></li>
  <li><a href="#icon"><cite>图标按钮</cite></a></li>
  <li><a href="#group"><cite>按钮组</cite></a></li>
  <li><a href="#container"><cite>按钮容器</cite> <span class="layui-badge-dot"></span></a></li>
</ul>
<div class="layui-main site-inline">
  <div class="site-tree">
  <ul class="layui-tree">
  
    <li><h2>基础说明</h2></li>
  
    <li class="site-tree-noicon ">
      <a href="doc.html">
        <cite>开始使用</cite>
        <em>Getting Started</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="infrastructure.html">
        <cite>底层方法</cite>
        <em>基础支撑</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="element.html">
        <cite>页面元素</cite>
        <em>规范 / 公共类 / 属性</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="modules.html">
        <cite>模块规范</cite>
        <em>使用 / 扩展</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="faq.html">
        <cite>常见问题</cite>
        <em>FAQ</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="changelog.html">
        <cite>更新日志</cite>
        
        <span class="layui-badge-dot" style="position: relative; top: -3px; left: -3px;"></span>
        
      </a>
    </li>
    
    <li><h2>页面元素</h2></li>
    
    
    <li class="site-tree-noicon ">
      <a href="layout.html">
        <cite>布局</cite>
        <em>栅格 / 后台布局</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="color.html">
        <cite>颜色</cite>
        <em>主题色设计感 / 内置背景色</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="icon.html">
        <cite>图标</cite>
        <em>字体图标</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="anim.html">
        <cite>动画</cite>
        <em>内置的CSS3动画类</em>
      </a>
    </li>
    
    <li class="site-tree-noicon layui-this">
      <a href="button.html">
        <cite>按钮</cite>
        <em>button组</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="form.html">
        <cite>表单</cite>
        <em>form元素集合</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="nav.html">
        <cite>导航</cite>
        <em>菜单 / 面包屑</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="tab.html">
        <cite>选项卡</cite>
        <em>Tabs 切换</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="progress.html">
        <cite>进度条</cite>
        <em>progress</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="panel.html">
        <cite>面板</cite>
        <em>折叠 / 手风琴</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="table.html">
        <cite>表格</cite>
        <em>静态table</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="badge.html">
        <cite>徽章</cite>
        <em>小圆点 / 小边框</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="timeline.html">
        <cite>时间线</cite>
        <em>timeline</em>
      </a>
    </li>
    <li class="site-tree-noicon ">
      <a href="auxiliar.html">
        <cite>辅助</cite>
        <em>引用 / 字段集 / 横线等</em>
      </a>
    </li>
   
    
    <li><h2>内置模块</h2></li>
    
    <li class="">
      <a href="layer.html">
        <i class="layui-icon" style="top: 3px;">&#xe638;</i><cite>弹出层</cite>
        <em>layer</em>
      </a>
    </li>
    <li class="">
      <a href="laydate.html">
        <i class="layui-icon" style="top: 1px;">&#xe637;</i><cite>日期与时间选择</cite>
        <em>laydate</em>
      </a>
    </li>
    <li >
      <a href="layim.html">
        <i class="layui-icon" style="position: relative; top: 3px;">&#xe63a;</i>
        <cite>即时通讯</cite>
        <em>layim</em>
      </a>
    </li>
    <li class="">
      <a href="laypage.html">
        <i class="layui-icon">&#xe633;</i><cite>分页</cite>
        <em>laypage</em>
      </a>
    </li>
    <li class="">
      <a href="laytpl.html">
        <i class="layui-icon">&#xe628;</i><cite>模板引擎</cite>
        <em>laytpl</em>
      </a>
    </li>
    <li class="">
      <a href="dataTable.html">
        <i class="layui-icon">&#xe62d;</i>
        <cite>数据表格</cite>
        <em>table</em>
      </a>
    </li>
    <li class="">
      <a href="DataForm.html">
        <i class="layui-icon" style="top: 2px;">&#xe63c;</i>
        <cite>表单</cite>
        <em>form</em>
      </a>
    </li>
    <li class="">
      <a href="upload.html">
        <i class="layui-icon">&#xe62f;</i>
        <cite>文件上传</cite>
        <em>upload</em>
      </a>
    </li>
    <li class="">
      <a href="DataElement.html">
        <i class="layui-icon" style="top: 1px; font-size: 18px;">&#xe62a;</i>
        <cite>常用元素操作</cite>
        <em>element</em>
      </a>
    </li>
    <li class="">
      <a href="carousel.html">
        <i class="layui-icon">&#xe634;</i>
        <cite>轮播</cite>
        <em>carousel</em>
      </a>
    </li>
    
    <li class="">
      <a href="flow.html">
        <i class="layui-icon">&#xe636;</i>
        <cite>流加载</cite>
        <em>flow</em>
      </a>
    </li>
    <li class="">
      <a href="util.html">
        <i class="layui-icon">&#xe631;</i>
        <cite>工具集</cite>
        <em>util</em>
      </a>
    </li>
    <li class="">
      <a href="code.html">
        <i class="layui-icon" style="top: 1px;">&#xe635;</i>
        <cite>代码修饰器</cite>
        <em>code</em>
      </a>
    </li>
    <ul class="layui-nav">
      <li class="layui-nav-item layui-this">
        <a href="doc.html">文档<!--  --></a> 
      </li>
      <li class="layui-nav-item ">
        <a href="../demo/demo.html">示例<!-- <span class="layui-badge-dot"></span> --></a>
      </li> 
      
      <li class="layui-nav-item layui-hide-xs">
        <a href="http://fly.layui.com/" target="_blank">社区</a>
      </li>
      
      
      <li class="layui-nav-item">
        <!--<span class="layui-badge-dot" style="margin: -4px 3px 0;"></span>-->
        <a href="javascript:;">周边</a>
        <dl class="layui-nav-child">
          <dd class="layui-hide-sm layui-show-xs"><a href="http://fly.layui.com/" target="_blank">社区交流</a><hr></dd>
          <dd><a href="http://layim.layui.com/" target="_blank">即时聊天</a></dd>
          <dd><a href="http://www.layui.com/template/fly/" target="_blank">社区模板<span class="layui-badge-dot"></span></a></dd>
          <hr>
          <dd><a href="http://www.layui.com/alone.html" target="_blank">独立组件</a></dd>
          <dd><a href="http://fly.layui.com/jie/9842/" target="_blank">Axure组件</a></dd>
        </dl>
      </li>
      
      
      <li class="layui-nav-item layui-hide-xs">
        <a href="http://www.layui.com/admin/" target="_blank">后台方案<span class="layui-badge-dot"></span></a>
      </li>
      
    </ul>
  </ul>
</div>

  <div class="site-content">
    <h1 class="site-h1">按钮 - 页面元素</h1>
    <blockquote class="site-text layui-elem-quote">
      向任意HTML元素设定<em>class="layui-btn"</em>，建立一个基础按钮。通过追加格式为<em>layui-btn-{type}</em>的class来定义其它按钮风格。内置的按钮class可以进行任意组合，从而形成更多种按钮风格。
    </blockquote>
    
    
    <div class="site-title">
      <fieldset><legend><a name="use">用法</a></legend></fieldset>
    </div>
    <div class="site-text">
      <pre class="layui-code">
&lt;button class="layui-btn">一个标准的按钮&lt;/button>
&lt;a href="http://www.layui.com" class="layui-btn">一个可跳转的按钮&lt;/a>
      </pre>
      <p></p>
    </div>
    
    <div class="site-title">
      <fieldset><legend><a name="theme">主题</a></legend></fieldset>
    </div>
    <div class="site-text">
      <p>
        <button class="layui-btn layui-btn-primary">原始按钮</button>
        <button class="layui-btn">默认按钮</button>
        <button class="layui-btn layui-btn-normal">百搭按钮</button>
        <button class="layui-btn layui-btn-warm">暖色按钮</button>
        <button class="layui-btn layui-btn-danger">警告按钮</button>
        <button class="layui-btn layui-btn-disabled">禁用按钮</button>
      </p>
      <table class="site-table">
        <thead>
          <tr>
            <th>名称</th>
            <th>组合</th>
          </tr> 
        </thead>
        <tbody>
          <tr>
            <td style="text-align: center;">原始</td>
            <td>class="layui-btn layui-btn-primary"</td>
          </tr>
          <tr>
            <td style="text-align: center;">默认</td>
            <td>class="layui-btn"</td>
          </tr>
          <tr>
            <td style="text-align: center;">百搭</td>
            <td>class="layui-btn layui-btn-normal"</td>
          </tr>
          <tr>
            <td style="text-align: center;">暖色</td>
            <td>class="layui-btn layui-btn-warm"</td>
          </tr>
          <tr>
            <td style="text-align: center;">警告</td>
            <td>class="layui-btn layui-btn-danger"</td>
          </tr>
          <tr>
            <td style="text-align: center;">禁用</td>
            <td>class="layui-btn layui-btn-disabled"</td>
          </tr>
        </tbody>
      </table>
    </div>
    
    <div class="site-title">
      <fieldset><legend><a name="size">尺寸</a></legend></fieldset>
    </div>
    <div class="site-text">
      <p>
        <button class="layui-btn layui-btn-lg">大型按钮</button>
        <button class="layui-btn">默认按钮</button>
        <button class="layui-btn layui-btn-sm">小型按钮</button>
        <button class="layui-btn layui-btn-xs">迷你按钮</button>
      </p>
      <table class="site-table">
        <thead>
          <tr>
            <th>尺寸</th>
            <th>组合</th>
          </tr> 
        </thead>
        <tbody>
          <tr>
            <td style="text-align: center;">大型</td>
            <td>class="layui-btn layui-btn-lg"</td>
          </tr>
          <tr>
            <td style="text-align: center;">默认</td>
            <td>class="layui-btn"</td>
          </tr>
          <tr>
            <td style="text-align: center;">小型</td>
            <td>class="layui-btn layui-btn-sm"</td>
          </tr>
          <tr>
            <td style="text-align: center;">迷你</td>
            <td>class="layui-btn layui-btn-xs"</td>
          </tr>
        </tbody>
      </table>
      <p>
        <button class="layui-btn layui-btn-lg layui-btn-normal">大型百搭</button>
        <button class="layui-btn layui-btn-warm">正常暖色</button>
        <button class="layui-btn layui-btn-sm layui-btn-danger">小型警告</button>
        <button class="layui-btn layui-btn-xs layui-btn-disabled">禁用</button>
      </p>
      <table class="site-table">
        <thead>
          <tr>
            <th>尺寸</th>
            <th>组合</th>
          </tr> 
        </thead>
        <tbody>
          <tr>
            <td style="text-align: center;">大型百搭</td>
            <td>class="layui-btn layui-btn-lg layui-btn-normal"</td>
          </tr>
          <tr>
            <td style="text-align: center;">正常暖色</td>
            <td>class="layui-btn layui-btn-warm"</td>
          </tr>
          <tr>
            <td style="text-align: center;">小型警告</td>
            <td>class="layui-btn layui-btn-sm layui-btn-danger"</td>
          </tr>
          <tr>
            <td style="text-align: center;">迷你禁用</td>
            <td>class="layui-btn layui-btn-xs layui-btn-disabled"</td>
          </tr>
        </tbody>
      </table>
      <div>
        <button class="layui-btn layui-btn-fluid">流体按钮（最大化适应）</button>
      </div>
      <div style="margin-top: 10px;">
        <button class="layui-btn layui-btn-primary layui-btn-fluid">流体按钮（最大化适应）</button>
      </div>
      <pre class="layui-code">
      
&lt;button class="layui-btn layui-btn-fluid"&gt;流体按钮（最大化适应）&lt;/button&gt;
      </pre>
    </div>
  
    <div class="site-title">
      <fieldset><legend><a name="radius">圆角</a></legend></fieldset>
    </div>
    <div class="site-text">
      <p>
        <button class="layui-btn layui-btn-radius layui-btn-primary">原始按钮</button>
        <button class="layui-btn layui-btn-radius">默认按钮</button>
        <button class="layui-btn layui-btn-radius layui-btn-normal">百搭按钮</button>
        <button class="layui-btn layui-btn-radius layui-btn-warm">暖色按钮</button>
        <button class="layui-btn layui-btn-radius layui-btn-danger">警告按钮</button>
        <button class="layui-btn layui-btn-radius layui-btn-disabled">禁用按钮</button>
      </p>
      <table class="site-table">
        <thead>
          <tr>
            <th>主题</th>
            <th>组合</th>
          </tr> 
        </thead>
        <tbody>
          <tr>
            <td style="text-align: center;">原始</td>
            <td>class="layui-btn layui-btn-radius layui-btn-primary"</td>
          </tr>
          <tr>
            <td style="text-align: center;">默认</td>
            <td>class="layui-btn layui-btn-radius"</td>
          </tr>
          <tr>
            <td style="text-align: center;">百搭</td>
            <td>class="layui-btn layui-btn-radius layui-btn-normal"</td>
          </tr>
          <tr>
            <td style="text-align: center;">暖色</td>
            <td>class="layui-btn layui-btn-radius layui-btn-warm"</td>
          </tr>
          <tr>
            <td style="text-align: center;">警告</td>
            <td>class="layui-btn layui-btn-radius layui-btn-danger"</td>
          </tr>
          <tr>
            <td style="text-align: center;">禁用</td>
            <td>class="layui-btn layui-btn-radius layui-btn-disabled"</td>
          </tr>
        </tbody>
      </table>
      <p>
        <button class="layui-btn layui-btn-lg layui-btn-radius layui-btn-normal">大型百搭</button>
        <button class="layui-btn layui-btn-sm layui-btn-radius layui-btn-danger">小型警告</button>
        <button class="layui-btn layui-btn-xs layui-btn-radius layui-btn-disabled">迷你禁用</button>
      </p>
      <table class="site-table">
        <thead>
          <tr>
            <th>尺寸</th>
            <th>组合</th>
          </tr> 
        </thead>
        <tbody>
          <tr>
            <td style="text-align: center;">大型百搭</td>
            <td>class="layui-btn layui-btn-lg layui-btn-radius layui-btn-normal"</td>
          </tr>
          <tr>
            <td style="text-align: center;">小型警告</td>
            <td>class="layui-btn layui-btn-sm layui-btn-radius layui-btn-danger"</td>
          </tr>
          <tr>
            <td style="text-align: center;">迷你禁用</td>
            <td>class="layui-btn layui-btn-xs layui-btn-radius layui-btn-disabled"</td>
          </tr>
        </tbody>
      </table>
      <p class="layui-word-aux">
        哈哈哈哈哈，这组合名长得简直没朋友~ 
        <img src="http://res.layui.com/layui/build/images/face/2.gif">
        <img src="http://res.layui.com/layui/build/images/face/38.gif">
      </p>
    </div>
      
    <div class="site-title">
      <fieldset><legend><a name="icon">图标</a></legend></fieldset>
    </div>
    <div class="site-text">
      <p>
        <button class="layui-btn"><i class="layui-icon">&#xe608;</i> 添加</button>
        <button class="layui-btn"><i class="layui-icon">&#x1002;</i></button>
        <button class="layui-btn"><i class="layui-icon">&#xe603;</i></button>
        <button class="layui-btn"><i class="layui-icon">&#xe602;</i></button>
        <button class="layui-btn"><i class="layui-icon">&#xe642;</i></button>
        <button class="layui-btn"><i class="layui-icon">&#xe640;</i></button>
        <button class="layui-btn"><i class="layui-icon">&#xe641;</i></button>
      </p>
      <p>
        <button class="layui-btn layui-btn-sm layui-btn-primary"><i class="layui-icon">&#x1002;</i></button>
        <button class="layui-btn layui-btn-sm layui-btn-primary"><i class="layui-icon">&#xe603;</i></button>
        <button class="layui-btn layui-btn-sm layui-btn-primary"><i class="layui-icon">&#xe602;</i></button>
        <button class="layui-btn layui-btn-sm layui-btn-primary"><i class="layui-icon">&#xe642;</i></button>
        <button class="layui-btn layui-btn-sm layui-btn-primary"><i class="layui-icon">&#xe640;</i></button>
        <button class="layui-btn layui-btn-sm layui-btn-primary"><i class="layui-icon">&#xe641;</i></button>
        
        <button class="layui-btn layui-btn-sm"><i class="layui-icon">&#x1002;</i></button>
        <button class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon">&#xe603;</i></button>
        <button class="layui-btn layui-btn-sm layui-btn-warm"><i class="layui-icon">&#xe602;</i></button>
        <button class="layui-btn layui-btn-sm layui-btn-danger"><i class="layui-icon">&#xe642;</i></button>
        <button class="layui-btn layui-btn-sm layui-btn-disabled"><i class="layui-icon">&#xe640;</i></button>
      </p>
      
      <pre class="layui-code" lay-title="结构">
&lt;button class="layui-btn">
  &lt;i class="layui-icon"><i>&</i>#xe608;&lt;/i> 添加
&lt;/button>
 
&lt;button class="layui-btn layui-btn-sm layui-btn-primary">
  &lt;i class="layui-icon"><i>&</i>#x1002;&lt;/i>
&lt;/button>
      </pre>
      <p class="layui-word-aux">温馨提示：各种图标字体请移步文档左侧【页面元素 - 图标】阅览</p>
    </div>
    
    <div class="site-title">
      <fieldset><legend><a name="group">按钮组</a></legend></fieldset>
    </div>
    <div class="site-text">
      <div class="layui-btn-group">
        <button class="layui-btn">增加</button>
        <button class="layui-btn">编辑</button>
        <button class="layui-btn">删除</button>
      </div>
      <div class="layui-btn-group">
        <button class="layui-btn layui-btn-sm">
          <i class="layui-icon">&#xe654;</i>
        </button>
        <button class="layui-btn layui-btn-sm">
          <i class="layui-icon">&#xe642;</i>
        </button>
        <button class="layui-btn layui-btn-sm">
          <i class="layui-icon">&#xe640;</i>
        </button>
        <button class="layui-btn layui-btn-sm">
          <i class="layui-icon">&#xe602;</i>
        </button>
      </div>
      <div class="layui-btn-group">
        <button class="layui-btn layui-btn-primary layui-btn-sm">
          <i class="layui-icon">&#xe654;</i>
        </button>
        <button class="layui-btn layui-btn-primary layui-btn-sm">
          <i class="layui-icon">&#xe642;</i>
        </button>
        <button class="layui-btn layui-btn-primary layui-btn-sm">
          <i class="layui-icon">&#xe640;</i>
        </button>
      </div>
      <p style="margin-top: 10px;">将按钮放入一个<em>class="layui-btn-group"</em>元素中，即可形成按钮组，按钮本身仍然可以随意搭配</p>
      <pre class="layui-code" lay-title="结构">
&lt;div class="layui-btn-group"&gt;
  &lt;button class="layui-btn">增加&lt;/button&gt;
  &lt;button class="layui-btn">编辑&lt;/button&gt;
  &lt;button class="layui-btn">删除&lt;/button&gt;
&lt;/div>
      
&lt;div class=&quot;layui-btn-group&quot;&gt;
  &lt;button class=&quot;layui-btn layui-btn-sm&quot;&gt;
    &lt;i class=&quot;layui-icon&quot;&gt;&amp;#xe654;&lt;/i&gt;
  &lt;/button&gt;
  &lt;button class=&quot;layui-btn layui-btn-sm&quot;&gt;
    &lt;i class=&quot;layui-icon&quot;&gt;&amp;#xe642;&lt;/i&gt;
  &lt;/button&gt;
  &lt;button class=&quot;layui-btn layui-btn-sm&quot;&gt;
    &lt;i class=&quot;layui-icon&quot;&gt;&amp;#xe640;&lt;/i&gt;
  &lt;/button&gt;
  &lt;button class=&quot;layui-btn layui-btn-sm&quot;&gt;
    &lt;i class=&quot;layui-icon&quot;&gt;&amp;#xe602;&lt;/i&gt;
  &lt;/button&gt;
&lt;/div&gt;
 
&lt;div class=&quot;layui-btn-group&quot;&gt;
  &lt;button class=&quot;layui-btn layui-btn-primary layui-btn-sm&quot;&gt;
    &lt;i class=&quot;layui-icon&quot;&gt;&amp;#xe654;&lt;/i&gt;
  &lt;/button&gt;
  &lt;button class=&quot;layui-btn layui-btn-primary layui-btn-sm&quot;&gt;
    &lt;i class=&quot;layui-icon&quot;&gt;&amp;#xe642;&lt;/i&gt;
  &lt;/button&gt;
  &lt;button class=&quot;layui-btn layui-btn-primary layui-btn-sm&quot;&gt;
    &lt;i class=&quot;layui-icon&quot;&gt;&amp;#xe640;&lt;/i&gt;
  &lt;/button&gt;
&lt;/div&gt;
      </pre>
    </div>
    
    <fieldset class="layui-elem-field layui-field-title site-title">
      <legend><a name="container">按钮容器</a></legend>
    </fieldset>
    <div class="site-text">
      <p>尽管按钮在同节点并排时会自动拉开间距，但在按钮太多的情况，效果并不是很美好。因为你需要用到按钮容器</p>
    </div>
    <div class="layui-btn-container">
      <button class="layui-btn">按钮一</button> 
      <button class="layui-btn">按钮二</button> 
      <button class="layui-btn">按钮三</button> 
      <button class="layui-btn">按钮四</button> 
      <button class="layui-btn">按钮五</button> 
      <button class="layui-btn">按钮六</button>
      <button class="layui-btn">按钮一</button> 
      <button class="layui-btn">按钮二</button> 
      <button class="layui-btn">按钮三</button> 
      <button class="layui-btn">按钮四</button> 
      <button class="layui-btn">按钮五</button> 
      <button class="layui-btn">按钮六</button>
      <button class="layui-btn">按钮一</button> 
      <button class="layui-btn">按钮二</button> 
      <button class="layui-btn">按钮三</button> 
      <button class="layui-btn">按钮四</button> 
      <button class="layui-btn">按钮五</button> 
      <button class="layui-btn">按钮六</button> 
      <button class="layui-btn">按钮一</button> 
      <button class="layui-btn">按钮二</button> 
    </div>
    <pre class="layui-code">
&lt;div class=&quot;layui-btn-container&quot;&gt;
  &lt;button class=&quot;layui-btn&quot;&gt;按钮一&lt;/button&gt; 
  &lt;button class=&quot;layui-btn&quot;&gt;按钮二&lt;/button&gt; 
  &lt;button class=&quot;layui-btn&quot;&gt;按钮三&lt;/button&gt; 
&lt;/div&gt;
    </pre>
 
    
    <div class="site-title">
      <fieldset><legend><a name="other">结语</a></legend></fieldset>
    </div>
    <div class="site-text">
      <p>你是否发现，主题、尺寸、图标、圆角的交叉组合，可以形成难以计算的按钮种类。另外，你可能最关注的是配色，Layui内置的六种主题的按钮颜色都是业界常用的标准配色，如果他们仍然无法与你的网站契合，那么请先允许我“噗”一声。。。然后你就大胆地自撸一个颜色吧！比如：<i style="color: #E46AA3;">粉红色</i>或者<i style="color: #A67727;">菊花色</i>（一个有味道的颜色）</p>
    </div>
    
    <div class="layui-elem-quote">
  <p>Layui - 用心与你沟通</p>
</div>
    
  </div></div>
  
<div class="layui-footer footer footer-doc">
  <div class="layui-main">
    <p>&copy; 2018 <a href="../layui.html">layui.com</a> MIT license</p>
    <p>
      <a href="http://fly.layui.com/case/2018/" target="_blank">案例</a>
      <a href="http://fly.layui.com/jie/3147/" target="_blank">众筹</a>
      <a href="mailto:xianxin@layui-inc.com">联系</a>
      <a href="https://github.com/sentsin/layui/" target="_blank" rel="nofollow">GitHub</a>
      <a href="https://gitee.com/sentsin/layui" target="_blank" rel="nofollow">码云</a>
      <a href="http://fly.layui.com/jie/2461/" target="_blank">微信公众号</a>
    </p>
    <p class="site-union">
      <a href="https://www.upyun.com?from=layui" target="_blank" rel="nofollow" upyun><img src="../imgs/upyun.png?t=1"></a>
      <span>提供 CDN 赞助</span>
    </p>
  </div>
</div>
<script async src="../js/adsbygoogle.js"></script>
<div class="site-tree-mobile layui-hide">
  <i class="layui-icon">&#xe602;</i>
</div>
<div class="site-mobile-shade"></div>
<script src="../layui/layui.js?t=1515376178738" charset="utf-8"></script>
<script>
window.global = {
  pageType: 'doc'
  ,preview: function(){
    var preview = document.getElementById('LAY_preview');
    return preview ? preview.innerHTML : '';
  }()
};
layui.config({
	 base: '../js/'
	 ,version: '1515376178709'
}).use('global');

layui.use("form",function(){
	var form = layui.form;
	
  //搜索组件
  form.on('select(component)', function(data){
    var value = data.value;
    location.href = value;
  });

  //切换版本
  form.on('select(tabVersion)', function(data){
    var value = data.value;
    if(value=="new")
	{
		location.href="doc.html";
	}else if(value=="v1")
	{
		location.href="v1.html";
	}
  });
  
});
</script>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_30088308'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "w.cnzz.com/c.php%3Fid%3D30088308' type='text/javascript'%3E%3C/script%3E"));</script>
</body>
</html>